import request from '@/utils/request'

/**
 * 获取月卡列表
 */
export const getCardListAPI = (params) => request({
  url: '/parking/card/list',
  params
})

// 新增月卡
export const createCardApi = (data) => request({
  url: '/parking/card',
  method: 'POST',
  data
})
// 获取月卡详情
export const getCardDetailApi = (id) => request({
  url: `/parking/card/detail/${id}`
})
// 更新月卡
export const updateCardApi = (data) => request({
  url: '/parking/card/edit',
  method: 'PUT',
  data
})
// 删除月卡
export const delCardApi = (id) => request({
  url: `/parking/card/${id}`,
  method: 'DELETE'
})
// 批量删除
export const delAllCardApi = (ids) => request({
  url: `/parking/card/${ids.join(',')}`,
  method: 'DELETE'
})
